package adc.app.spec;


/**
 * Base interface for business services that need authentication.
 * 
 * @author alexandru.deac
 * 
 */
public interface ISecuredBs extends IUserContextAware {
    /**
     * Getter for the currently authenticated user.
     * 
     * @return the currently authenticated user
     * @throws AutheRequiredException
     *             if there is no authenticated user
     * @throws BsException
     *             if another business error occurs
     */
    public IUser getUser() throws AutheRequiredException, BsException;

    /**
     * Is there an authenticated user?
     * 
     * @return <code>true</code> if there is an authenticated user,
     *         <code>false</code> otherwise
     */
    public boolean isAuthenticated();
}
